//package com.yiwei.ydd.activity;
//
//import android.os.Bundle;
//import android.support.design.widget.TabLayout;
//import android.support.v4.app.Fragment;
//import android.support.v4.app.FragmentPagerAdapter;
//import android.support.v4.view.ViewPager;
//import android.widget.ImageView;
//import android.widget.TextView;
//
//import com.yiwei.ydd.R;
//import com.yiwei.ydd.base.BaseActivity;
//import com.yiwei.ydd.fragment.CommissionOrderFragment;
//import com.yiwei.ydd.fragment.MyCommissionFragment;
//import com.yiwei.ydd.fragment.MyInviteFragment;
//
//import butterknife.BindView;
//import butterknife.ButterKnife;
//import butterknife.Unbinder;
//
///**
// * Created by xsooy-pc on 17-12-8.
// */
//
//public class InviteFriendActivity extends BaseActivity {
//    @BindView(R.id.btn_back)
//    ImageView btnBack;
//    @BindView(R.id.txt_title)
//    TextView txtTitle;
//    @BindView(R.id.pager)
//    ViewPager pager;
//    @BindView(R.id.tablayout)
//    TabLayout tablayout;
//
//
//    private Unbinder unbiner;
//    private MyInviteFragment myInvite;
//    private MyCommissionFragment myCommission;
//    private CommissionOrderFragment commissionoOrder;
//
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_invite_friend);
//        initBar();
//        unbiner = ButterKnife.bind(this);
//        init();
//    }
//
//    private void init() {
//        txtTitle.setText("邀请好友赚佣金");
//        myInvite = new MyInviteFragment();
//        myCommission = new MyCommissionFragment();
//        commissionoOrder = new CommissionOrderFragment();
//        Fragment[] fragments = {commissionoOrder, myInvite, myCommission};
//        String[] titles=new String[]{"佣金排行榜","我的邀请","我的佣金"};
//        pager.setAdapter(new FragmentPagerAdapter(getSupportFragmentManager()) {
//            @Override
//            public CharSequence getPageTitle(int position) {
//                return titles[position];
//            }
//
//            @Override
//            public Fragment getItem(int position) {
//                return fragments[position];
//            }
//
//            @Override
//            public int getCount() {
//                return fragments.length;
//            }
//        });
//        tablayout.setupWithViewPager(pager);
//    }
//
//    @Override
//    protected void onDestroy() {
//        super.onDestroy();
//        unbiner.unbind();
//        unbiner = null;
//    }
//}
